#include "timer.h"
#include "stdio.h"
#include "adc.h"  

void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef *htim)
{
  static uint32_t count = 0;
  if(htim->Instance == TIM4)
  {
  }
  else if(htim->Instance == TIM1)
  {
    count++;
    if(count >= 1000)
    {
      count = 0;
      HAL_GPIO_TogglePin(GPIOC,GPIO_PIN_13);
      
      printf("bat vol: %d_%d\r\n",get_bat_vol(), get_vrefint_vol());
      // printf("hello world !!!\r\n");
    }
  }
}